package org.tokaf.datasearcher;

/**
 * <p>Interface, that does modifications on database.</p>
 * <p>It is designed for RDF database and storing triples.</p>
 * <p>Copyright (c) 2006</p>
 * @author Alan Eckhardt
 * @version 1.0
 */
public interface DataModifier {
	/**
	 * Deletes triple from database.
	 * @param subject Subject of triple.
	 * @param predicate Predicate of triple.
	 * @param object Object of triple.
	 * @return int
	 */
	public int deleteTriple(Object subject, Object predicate, Object object);

	/**
	 * Deletes triple from database.
	 * @param subject Subject of triple.
	 * @param predicate Predicate of triple.
	 * @param object Object of triple.
	 * @param datatype Datatype of object.
	 * @return int
	 */
	public int deleteTriple(Object subject, Object predicate, Object object,
			String datatype);

	/**
	 * Adds triple from database.
	 * @param subject Subject of triple.
	 * @param predicate Predicate of triple.
	 * @param object Object of triple.
	 * @return int
	 */
	public int addTriple(Object subject, Object predicate, Object object);

	/**
	 * Adds triple from database.
	 * @param subject Subject of triple.
	 * @param predicate Predicate of triple.
	 * @param object Object of triple.
	 * @param datatype Datatype of object.
	 * @return int
	 */
	public int addTriple(Object subject, Object predicate, Object object,
			String datatype);

	/**
	 * Adds reified triple from database.
	 * @param subject Subject of triple to be reified.
	 * @param predicate Predicate of triple to be reified.
	 * @param object Object of triple to be reified.
	 * @param reifPredicate Predicate of reification triple.
	 * @param reifObject Object of reification triple.
	 * @return int
	 */
	public int addReifiedTriple(Object subject, Object predicate,
			Object object, Object reifPredicate, Object reifObject);

	/**
	 * Adds reified triple from database.
	 * @param subject Subject of triple to be reified.
	 * @param predicate Predicate of triple to be reified.
	 * @param object Object of triple to be reified.
	 * @param datatype Datatype of reified object.
	 * @param reifPredicate Predicate of reification triple.
	 * @param reifObject Object of reification triple.
	 * @return int
	 */
	public int addReifiedTriple(Object subject, Object predicate,
			Object object, String datatype, Object reifPredicate,
			Object reifObject);

	/**
	 * Adds reified triple from database.
	 * @param subject Subject of triple to be reified.
	 * @param predicate Predicate of triple to be reified.
	 * @param object Object of triple to be reified.
	 * @param reifPredicate Predicate of reification triple.
	 * @param reifObject Object of reification triple.
	 * @param reifDatatype Datatype of reification object.
	 * @return int
	 */
	public int addReifiedTriple(Object subject, Object predicate,
			Object object, Object reifPredicate, Object reifObject,
			String reifDatatype);

	/**
	 * Adds reified triple from database.
	 * @param subject Subject of triple to be reified.
	 * @param predicate Predicate of triple to be reified.
	 * @param object Object of triple to be reified.
	 * @param datatype Datatype of reified object.
	 * @param reifPredicate Predicate of reification triple.
	 * @param reifObject Object of reification triple.
	 * @param reifDatatype Datatype of reification object.
	 * @return int
	 */
	public int addReifiedTriple(Object subject, Object predicate,
			Object object, String datatype, Object reifPredicate,
			Object reifObject, String reifDatatype);
}
